package dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import JDBC.DatabaseDao;

public class TagDao {

	static Connection con=DatabaseDao.getConnection();
    /**
     * @author 韩 闻文
     * total tags
     * @return
     */
	public static int getCount() {
		int result = 0;
		try {
			String sql = "select count(*) from tags";
			System.out.println(sql);
			Statement stmt = con.createStatement();
			ResultSet rs = stmt.executeQuery(sql);
			rs.next();
			result = rs.getInt(1);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}


}
